﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SQ.Core.Configuration.Framework
{
    public class FrameworkConfig
    {
        public int NumeroTreadsDisponiveis
        {
            get;
            private set;
        }

        public bool IsProcessamentoParalelizado
        {
            get;
            private set;
        }

        public int TempoPausaProcessamento
        {
            get;
            private set;
        }

        public FrameworkConfig()
        {
            FrameworkSection framework = (FrameworkSection)ConfigurationManager.GetSection("Framework");
            this.TempoPausaProcessamento = int.Parse(framework.TempoPausaProcessamento);
            this.IsProcessamentoParalelizado = bool.Parse(framework.ProcessamentoParalelizado);
            this.NumeroTreadsDisponiveis = int.Parse(framework.QuantidadeThreads);
        }
    }
}
